#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<string.h>
int main()
{
	int n,max=0,p;
	scanf("%d\n", &n);
	char str[6][100];
	for (int i = 0; i < n; i++) gets(str[i]);
	for (int i = 0; i <n; i++)
	{
		if (strlen(str[i]) > max) max = strlen(str[i]),p=i;
	}
	printf("%s", str[p]);
	return 0;
}
